home *** CD-ROM | disk | FTP | other *** search
- /* If you are not pre-compiling your C header files in MPW, you really */
- /* owe it to yourself to do so. It can save (for most apps ) */
- /* a good 30% of your compile time */
- /* Lookin your MPW C manual for details, or follow these steps */
-
-
- /* The first time you compile your program, set the flag after this IF */
- /* to TRUE */
- /* This will tell MPW C to dump the headers for you. Then change the flag */
- /* to FALSE, and MPW will read the dumped file from then on, saving you much time */
- /* NOTE: Remember, if the headers change, recompile */
- /* #if 0 */
- #include <Types.h>
- #include <Memory.h>
- #include <Quickdraw.h>
- #include <TextEdit.h>
- #include <Dialogs.h>
- #include <Devices.h>
- #include <Scrap.h>
- #include <menus.h>
- #include <PPCToolbox.h>
- #include <AppleEvents.h>
- #include <StandardFile.h>
- #include <EPPC.h>
- #include <Aliases.h>
- #include <events.h>
- #include <gestaltequ.h>
- #include <ToolUtils.h>
- /* Name this anythign you want. I personally precompile ALL the header files */
- /* and save tehm in a file in the CIncludes directory. But, that file ends up */
- /* being about 1.5 meg, and you may want something smaller */
- /* #pragma dump "NonAppDump" */
-
- /* #else */
- /* #pragma load "NonAppDump" */
- /* #endif */
-
-
-
-
-
- /* Types */
- struct MyPPCRec {
- PPCParamBlockRec pB;
- Ptr buffer; /* buffer we're using */
- Size bufferSize; /* guess */
- Handle dataToXfer;
- PPCPortPtr myPort;
- PPCPortPtr buddyPortPtr;
- PPCPortRefNum ourPort;
- PPCSessRefNum currentSessionRef;
-
- };
- typedef struct MyPPCRec MyPPCRec, *MyPPCRecPtr,**MyPPCRecHandle;
-
-
- typedef struct CDEVRec {
- Handle spare;
- MyPPCRecPtr myPPCBlock;
- /* LocationName won't be needed, since we're staying local */
- Boolean searchForTarget; /* searchForTarget is our flag to tell us that we do not */
- /* know where AEBuddy is yet, and we have to keep looking. */
- /* It also implies (if true) that PBCat has already been */
- /* called, if necessary */
- Boolean noBuddy; /* PBCatSearch failed, give it up */
- Boolean notSys7;
- Boolean eventPending;
- } CDEVRec, *CDEVPtr, **CDEVHnd;
-
-
-
-
- struct MyPPCRecDeamon { /* to differenciact it from the one I'm using in teh CDEV */
- PPCParamBlockRec pB;
- Ptr buffer; /* buffer we're using */
- Size bufferSize; /* guess */
- Handle dataToXfer;
- PPCPortPtr myPort;
- PPCPortRefNum ourPort;
- PPCSessRefNum currentSessionRef;
-
- };
- typedef struct MyPPCRecDeamon MyPPCRecDeamon, *MyPPCRecPtrDeamon,**MyPPCRecHandleDeamon;
- #define kOneK 1024
- #define kMyTypeOfData 'MAVT'
- #define kGenericCreator '????'
- #define kSendButton 1
- #define kNoBuddyAlert -4048
- #define kNot70 -4049
- #define kStringsID -4048
- #define kBrowse1 1
- #define kBrowse2 2
- #define kMyName 3
- #define kWatchCursor 4
-
- /* Prototypes and externs (there the same, y'see ) */
-
- #ifdef __BUILDINGDEAMON__
- #ifdef __DAE__
- #define sayExtern
- #else
- #define sayExtern extern
- #endif
- sayExtern void InitAEStuff(void);
- sayExtern void DoHighLevel(EventRecord *AERecord);
- sayExtern pascal OSErr AEOpenHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- sayExtern pascal OSErr AEOpenDocHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- sayExtern pascal OSErr AEPrintHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- sayExtern pascal OSErr AEQuitHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
- #ifdef __AEDPPCSTUFF__
- #define sayExtern
- #else
- #define sayExtern extern
- #endif
- sayExtern Boolean InformTheWorld(void);
- sayExtern OSErr OpenAPort(PPCOpenPBPtr myPort);
- sayExtern Boolean DoInform(PPCInformPBPtr p);
- sayExtern void CloseOffTheWorld(void);
- sayExtern void OpenComplete(PPCInformPBPtr p);
- sayExtern void InformComplete(PPCReadPBPtr p);
- sayExtern void ReadComplete(PPCReadPBPtr p);
- sayExtern void CollectLastData(void);
- #endif
-
- #ifdef __BUILDINGCDEV__
- #ifdef __AEDEV__
- #define sayExtern
- #else
- #define sayExtern extern
- #endif
- sayExtern pascal Handle AECDEV(short message, short item, short numItems, short CPanelID, EventRecord *theEvent, Handle cdevStorage,
- DialogPtr CPDialog);
- sayExtern ControlHandle SnatchHandle(DialogPtr thebox, short theGetItem);
- #ifdef __AECDEVPPC__
- #define sayExtern
- #else
- #define sayExtern extern
- #endif
- sayExtern void FindATarget(CDEVHnd storage);
- sayExtern void FindAEBuddy(CDEVHnd storage);
- sayExtern void FireTheEvent(Handle packedEvent, CDEVHnd storage);
- sayExtern void OpenComplete(PPCStartPBPtr p);
- sayExtern void StartComplete(PPCWritePBPtr p);
- sayExtern void WriteComplete(PPCEndPBPtr p);
- sayExtern void EndComplete(PPCClosePBPtr p);
- #endif